
import java.awt.Color;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;


public class PizzaRow extends JPanel{
	 public int iter;
	 private Pizza pizza;
	 int height=154, weight=600;
	public PizzaRow(int i,int width , int height,Pizza pizza){
		this.iter=i;
		this.pizza=pizza;
		this.height = height;
		this.weight=width;
	setLayout(null);
	setVisible(true);
	
	JLabel setAvatar = new JLabel(pizza.getAvatar());
	JLabel setName = new JLabel(pizza.getName());
	final JLabel setDescriptions = new JLabel(pizza.getDescriptions());
	//next page to bedziew adapter do wyswietlania

	setAvatar.setBackground(Color.red);
	setAvatar.setOpaque(true);
	
	setName.setBackground(Color.blue);
	//setName.setOpaque(true);
	
	setDescriptions.setBackground(Color.green);
	setDescriptions.setOpaque(true);
	
	setName.setVisible(true);
	setDescriptions.setVisible(true);
	setAvatar.setVisible(true);
	setBounds(0  , iter, width, height);
	setName.setBounds(		10, 	15,		width, 		10);
	setAvatar.setBounds(	10, 	30, 	154, 	105);
	setDescriptions.setBounds(	170, 30, 	width-160,	101);

	add(setName);
			add(setAvatar);
					add(setDescriptions);
					System.out.println(setName.getBounds().toString()+
							setAvatar.getBounds().toString()+
							setDescriptions.getBounds().toString());
					
	}

	public Pizza getPizza() {
		return pizza;
	}
	public void setPizza(Pizza pizza) {
		this.pizza = pizza;
	}
	public double getIter()
	{
		return iter;
	}
}
